package com.xy.smarthouse;

public class ClientTest {
	public static void main(String[] args) {
		// 智能设备中介者
		Mediator mediator = new ConcreteMediator();

		// 添加智能设备到管中介中
		Alarm alarm = new Alarm(mediator, "alarm");
		CoffeeMachine coffeeMachine = new CoffeeMachine(mediator, "coffeeMachine");
		Curtains curtains = new Curtains(mediator, "curtains");
		TV tV = new TV(mediator, "TV");

		// 发送消息
		alarm.SendAlarm(0);
		coffeeMachine.FinishCoffee();
		alarm.SendAlarm(1);
	}
}
